package com.ks.config.service.basic.impl;

import com.ks.config.dao.mapper.basicConfig.BasicConfigMapper;
import com.ks.config.domain.dto.ConfigDO;
import com.ks.config.service.basic.BasicConfigService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BasicConfigServiceImpl implements BasicConfigService {

    @Resource
    private BasicConfigMapper basicConfigMapper;

    @Override
    public int add(ConfigDO configDO) {
        return basicConfigMapper.add(configDO);
    }

    @Override
    public int deleteByKey(String key) {
        return basicConfigMapper.deleteByKey(key);
    }

    @Override
    public int deleteById(long id) {
        return basicConfigMapper.deleteById(id);
    }

    @Override
    public int updateConfig(ConfigDO configDO) {
        return basicConfigMapper.updateConfig(configDO);
    }

    @Override
    public ConfigDO listByKey(String config_key) {
        return basicConfigMapper.listByKey(config_key);
    }

    @Override
    public List<ConfigDO> listAllConfig() {
        return basicConfigMapper.listAllConfig();
    }
}
